package com.tinycloud.miracll.product.service.impl;

import java.util.List;
import com.tinycloud.common.core.utils.DateUtils;
import com.tinycloud.common.datasource.annotation.Slave3;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tinycloud.miracll.product.mapper.ProductKeyProcessAlarmMapper;
import com.tinycloud.miracll.product.domain.ProductKeyProcessAlarm;
import com.tinycloud.miracll.product.service.IProductKeyProcessAlarmService;

/**
 * 重控工艺报警Service业务层处理
 * 
 * @author tiny
 * @date 2022-01-17
 */
@Service
@Slave3
public class ProductKeyProcessAlarmServiceImpl implements IProductKeyProcessAlarmService 
{
    @Autowired
    private ProductKeyProcessAlarmMapper productKeyProcessAlarmMapper;

    /**
     * 查询重控工艺报警
     * 
     * @param id 重控工艺报警主键
     * @return 重控工艺报警
     */
    @Override
    public ProductKeyProcessAlarm selectProductKeyProcessAlarmById(String id)
    {
        return productKeyProcessAlarmMapper.selectProductKeyProcessAlarmById(id);
    }

    /**
     * 查询重控工艺报警列表
     * 
     * @param productKeyProcessAlarm 重控工艺报警
     * @return 重控工艺报警
     */
    @Override
    public List<ProductKeyProcessAlarm> selectProductKeyProcessAlarmList(ProductKeyProcessAlarm productKeyProcessAlarm)
    {
        return productKeyProcessAlarmMapper.selectProductKeyProcessAlarmList(productKeyProcessAlarm);
    }

    /**
     * 新增重控工艺报警
     * 
     * @param productKeyProcessAlarm 重控工艺报警
     * @return 结果
     */
    @Override
    public int insertProductKeyProcessAlarm(ProductKeyProcessAlarm productKeyProcessAlarm)
    {
        productKeyProcessAlarm.setCreateTime(DateUtils.getNowDate());
        return productKeyProcessAlarmMapper.insertProductKeyProcessAlarm(productKeyProcessAlarm);
    }

    /**
     * 修改重控工艺报警
     * 
     * @param productKeyProcessAlarm 重控工艺报警
     * @return 结果
     */
    @Override
    public int updateProductKeyProcessAlarm(ProductKeyProcessAlarm productKeyProcessAlarm)
    {
        return productKeyProcessAlarmMapper.updateProductKeyProcessAlarm(productKeyProcessAlarm);
    }

    /**
     * 批量删除重控工艺报警
     * 
     * @param ids 需要删除的重控工艺报警主键
     * @return 结果
     */
    @Override
    public int deleteProductKeyProcessAlarmByIds(String[] ids)
    {
        return productKeyProcessAlarmMapper.deleteProductKeyProcessAlarmByIds(ids);
    }

    /**
     * 删除重控工艺报警信息
     * 
     * @param id 重控工艺报警主键
     * @return 结果
     */
    @Override
    public int deleteProductKeyProcessAlarmById(String id)
    {
        return productKeyProcessAlarmMapper.deleteProductKeyProcessAlarmById(id);
    }
}
